package com.yoshino.factory.factory_method.pizzastore.order;


import com.yoshino.factory.factory_method.pizzastore.pizza.BJCheesePizza;
import com.yoshino.factory.factory_method.pizzastore.pizza.BJPepperPizza;
import com.yoshino.factory.factory_method.pizzastore.pizza.Pizza;

/**
 * @author yoshino
 **/
public class BJOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {

        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new BJCheesePizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new BJPepperPizza();
        }

        return pizza;
    }
}
